#ifndef SERVER_H
#define SERVER_H

#include <semaphore.h>
#include "queue.h"
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <arpa/inet.h>

struct producer_consumer
{
	QUE *que;
	sem_t semw;
	sem_t semr;
	pthread_mutex_t mutex;
};

void *producer(void *arg);
void *consumer(void *arg);

struct  producer_consumer *model_init(int);
void destroy_model(struct producer_consumer *pool);

extern int serverSocket;
int create_socket(const char *ip,unsigned short int port);



#endif

